home *** CD-ROM | disk | FTP | other *** search
- /*
- ** requestinteger.thor - Will let the user enter a number within the given
- ** range. No other characters than a number will be
- ** accepted.
- ** If the user chooses cancels the requester with
- ** the right-most choice, rc will be set to 5 (RC_WARN).
- ** Although it is possible to have more than two gadgets
- ** with the BUTTONTEXT argument, this is not recommended.
- ** The ideal choice is to let BUTTONTEXT contain
- ** "Ok | Cancel". MIN and MAX are the minimum and maximum
- ** numbers that can be entered into the requester.
- ** If the argument INITIALINTEGER is present, the number
- ** given here will come up initially in the requester.
- ** TITLETEXT is the title of the requester, and VAR is
- ** the name of an optional variabel that THOR will put
- ** the number entered into. If not present, result will
- ** contain the number entered.
- **
- **
- ** Template:
- **
- ** MIN/A/N,MAX/A/N,INITIALINTEGER=INIT/N,TITLETEXT=TITLE/A,BUTTONTEXT=BT/A,VAR
- */
-
- options results
-
- address "THOR.01"
-
- THORTOFRONT
-
- REQUESTINTEGER MIN 12 MAX 100 INIT 34 TITLE '"Enter a number:"' BT '"Ok|Cancel"' var NUMBER
-
- if(rc ~= 0) then exit
-
- say "Number entered : " NUMBER
-
- exit
-